import { hideToast, showToast } from "@tarojs/taro";
class Toast {
    show(content, icon, successCallback, timer) {
        showToast({
            title: content,
            mask: true,
            icon,
            success: () => {
                setTimeout(() => {
                    if (typeof successCallback === "function")
                        successCallback();
                }, timer !== null && timer !== void 0 ? timer : 1500);
            }
        }).then();
    }
    hide() {
        hideToast();
    }
}
export default new Toast();
